package com.nt.train.exception;

import lombok.Data;

/**
 * @author hlf
 * @version 1.0
 * @date 2022/9/22 15:01
 */
@Data
public class APIException extends RuntimeException {

    private int code;

    private String msg;

    public APIException() {
        this(1001, "接口错误");
    }

    public APIException(String msg) {
        this(1001, msg);
    }

    public APIException(int code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }
}